﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace INSTA.MusiqueStore.DAL
{
    public static class MusicUser
    {
        public static List<Piste> GetPiste(int id)
        {
           
            var c = new MusiqueStoreEntities();
            var a = (from achat in c.Achats
                     where achat.Client.Id==id 
                     select achat.Pistes);
            return a.SelectMany(collection => collection).ToList();
            
        }
    }
}


